package com.longshine.downcomp;

import com.longshine.platform.equip.tcp.ProtocolDispacher;
import com.longshine.platform.equip.tcp.ProtocolUtil;

public class SecuritySystem extends EquipSystem{

	public SecuritySystem(int systemType, int downNo) {
		super(systemType, downNo);
	}

	@Override
	public void recvCommand(int taskId, int functionCode, String dataArea)
			throws Exception {
		if (functionCode == ProtocolDispacher.FUNCTION_PROTECTION
				|| functionCode == ProtocolDispacher.FUNCTION_REVOK_PROTECTION
				|| functionCode == ProtocolDispacher.FUNCTION_SECU_OPEN_ALARM
				|| functionCode == ProtocolDispacher.FUNCTION_SECU_CLOSE_ALARM) {
			conn.sendStr(ProtocolUtil.createProtocol(downNo, taskId, systemType,
					ProtocolDispacher.FUNCTION_REPLY,
					ProtocolDispacher.DATAAREA_COMFIRM));
		}

	}

}
